Changeset 458:78cd48f17c14 in SMSSender


Ignore:
Timestamp:
Jan 5, 2015 11:15:28 AM (3 years ago)
Author:
Sämy Zehnder <saemy.zehnder@…>
Branch:
new-gtwy-coopmobile
Message:

Fixes the computation of the sms costs and the splitting for the CoopMobile?
gateway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gateways/CoopMobile/business/account_costs.cpp

    r454 r458  
    11/*
    22  Coop Mobile gateway plugin - The smssender plugin for the Coop Mobile platform.
    3   Copyright (C) 2011-2014, gorrión. See http://smssender.gorrion.ch
     3  Copyright (C) 2011-2015, gorrión. See http://smssender.gorrion.ch
    44
    55  This program is free software: you can redistribute it and/or modify
     
    5858
    5959    const bool messageContainsSpecialChars = hasSpecialChars(
    60                 message, '\r' + '\n' + GSM_CHARS + GSM_DOUBLE_PRICE_CHARS);
     60                message, QString("\r\n") + GSM_CHARS + GSM_DOUBLE_PRICE_CHARS);
    6161    const MaxCount *maxCount = messageContainsSpecialChars
    6262            ? &SPECIAL_MAX_COUNT
     
    8686QStringList Account::MessageDivider::divideMessageIntoLongSMS(
    8787        const QString &message) const {
    88     return divideMessageIntoLongSMS(message + FORCED_MESSAGE_SUFFIX, NULL);
     88    return divideMessageIntoLongSMS(message, NULL);
    8989}
    9090
    9191int Account::MessageDivider::costsForMessage(const QString &message) const {
    9292    int costs;
    93     divideMessageIntoLongSMS(message, &costs);
     93    divideMessageIntoLongSMS(message + FORCED_MESSAGE_SUFFIX, &costs);
    9494    return costs;
    9595}
Note: See TracChangeset for help on using the changeset viewer.